package cn.melon.view.admin.course.ctr;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import org.apache.log4j.Logger;

import cn.melon.helper.LoggerHelper;
import cn.melon.mod.sc.ScRequest;
import cn.melon.view.admin.course.AddCourseDlg;
import cn.melon.view.admin.course.CourseJPanel;

public class CoursePanelCtr implements ActionListener{
    private Logger coursePanelCtrLog = LoggerHelper.clientLogger();
    
    private CourseJPanel panel = null;
    
    public CoursePanelCtr(CourseJPanel panel) {
        this.panel = panel;
    }
    
    
    @Override
    public void actionPerformed(ActionEvent e) {
        switch (e.getActionCommand()) {
        case "查询":
            ScRequest request = new ScRequest(panel);
            request.getGetAllScInfoResult();
            break;
        case "添加课程":
            AddCourseDlg dlg = new AddCourseDlg(panel);
            dlg.setVisible(true);
            break;
        default:
            break;
        }
    }

}
